package model

import "github.com/zeromicro/go-zero/core/stores/mon"

var _ ChatMsgModel = (*customChatMsgModel)(nil)

type (
	// ChatMsgModel is an interface to be customized, add more methods here,
	// and implement the added methods in customChatMsgModel.
	ChatMsgModel interface {
		chatMsgModel
	}

	customChatMsgModel struct {
		*defaultChatMsgModel
	}
)

// NewChatMsgModel returns a model for the mongo.
func NewChatMsgModel(url, db, collection string) ChatMsgModel {
	conn := mon.MustNewModel(url, db, collection)
	return &customChatMsgModel{
		defaultChatMsgModel: newDefaultChatMsgModel(conn),
	}
}
